import 'package:flutter/material.dart';
import 'package:get/get.dart';

class PipeChatCommentView extends StatelessWidget {
  const PipeChatCommentView({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
        color: Color(0xFF171717),
        borderRadius: BorderRadius.only(
          topLeft: Radius.circular(16),
          topRight: Radius.circular(16),
        ),
      ),
      width: double.infinity,
      height: MediaQuery.of(context).size.height - 200,
      padding: EdgeInsets.only(left: 10, top: 15, right: 10, bottom: 5),
      child: Column(
        children: [
          Row(
            children: [
              Padding(
                padding: EdgeInsets.only(left: 5),
                child: Text(
                  "评论",
                  style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 16),
                ),
              ),
              Spacer(),
              GestureDetector(
                child: Icon(
                  Icons.close,
                  color: Colors.white38,
                ),
                onTap: () {
                  Get.back();
                },
              )
            ],
          ),
          // 评论内容
          Expanded(
            child: Center(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text(
                    "暂无评论",
                    style: TextStyle(
                      color: Colors.grey,
                      fontSize: 16,
                    ),
                  ),
                  SizedBox(height: 16),
                  OutlinedButton.icon(
                    style: OutlinedButton.styleFrom(
                      foregroundColor: Color(0xFF1AC432),
                      side: BorderSide(color: Color(0xFF1AC432), width: 1),
                      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
                    ),
                    onPressed: () {
                      // 添加评论逻辑
                    },
                    icon: Icon(Icons.edit, color: Color(0xFF1AC432)),
                    label: Text(
                      "发布第一条评论",
                      style: TextStyle(fontSize: 16),
                    ),
                  ),
                ],
              ),
            ),
          ),
          Container(
            padding: EdgeInsets.symmetric(horizontal: 16, vertical: 0),
            margin: EdgeInsets.only(bottom: 12),
            decoration: BoxDecoration(
              color: Color(0xFF1F1F1F),
              borderRadius: BorderRadius.circular(12),
            ),
            child: Row(
              children: [
                Text(
                  "发评论...",
                  style: TextStyle(color: Colors.white54),
                ),
                Spacer(),
                InkWell(
                  child: Container(
                    padding: EdgeInsets.symmetric(horizontal: 5, vertical: 10),
                    child: Icon(
                      Icons.image,
                      color: Colors.white,
                      size: 20,
                    ),
                  ),
                  onTap: () {},
                ),
                InkWell(
                  child: Container(
                    padding: EdgeInsets.symmetric(horizontal: 5, vertical: 10),
                    child: Icon(
                      Icons.emoji_emotions,
                      color: Colors.white,
                      size: 20,
                    ),
                  ),
                  onTap: () {},
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
